﻿package net.wangit.adm.user;

import java.util.Map;

import net.wangit.adm.role.PrivilegeTreeFactory;
import net.wangit.user.RegisteredUser;
import net.wangit.user.UserFactory;


public class UserPrivilegeTreeFactory extends PrivilegeTreeFactory {

	public UserPrivilegeTreeFactory() {
	}

	protected String getDomain() {
		return UserAuthUI.getAndSetDomain();
	}

	protected Map getPrivileges() throws Exception {
		String userId = UserAuthUI.getAndSetUserId();
		RegisteredUser user = (RegisteredUser) UserFactory.getUser(userId);
		return user.getPrivileges();
	}

	protected boolean isDisabled() {
		return true;
	}
}
